package com.biz.primus.account.feign;

import com.biz.primus.base.exception.BizCheckedException;
import com.biz.primus.model.sso.auth.vo.MenusRegisterReqVO;
import com.biz.primus.model.sso.auth.vo.UserAuthoritiesResVO;
import org.springframework.stereotype.Component;

import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Sets.newHashSet;

/**
 * Created by younger on 17/11/10.
 */
@Component
public class AuthorityDegradedFeignClient implements AuthorityFeignClient{

    @Override
    public UserAuthoritiesResVO getUserAuthorities(String userUnionId) {
        return new UserAuthoritiesResVO();
    }

    @Override
    public void authorityRegister(MenusRegisterReqVO reqVO) {}

    @Override
    public UserAuthoritiesResVO listUserMenusAndGrantedAuthorities(String userUnionId) throws BizCheckedException {

        UserAuthoritiesResVO userAuthoritiesResVO = new UserAuthoritiesResVO();
        userAuthoritiesResVO.setMenuGroups(newArrayList());
        userAuthoritiesResVO.setGrantedAuthorities(newHashSet());
        return userAuthoritiesResVO;
    }
}
